package com.github.cloud.feign.fallback;

import com.github.cloud.feign.UserService;
import com.github.cloud.model.vo.UserVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * Created by guxiaowei on 2018/3/7.
 * 用户服务fallback
 */
@Service
public class UserServiceFallbackImpl implements UserService{
    private Logger logger = LoggerFactory.getLogger(this.getClass());

    /**
     * 用户模块远程调用回调
     * @param username 用户名
     * @return
     */
    @Override
    public UserVo findUserByUsername(String username) {
        logger.error("调用{}异常:{}", "findUserByUsername", username);
        return null;
    }
}
